package com.hq.controller;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author hanq
 * feignclient 声明接口
 * fallback:熔断机制，在远程调用时出现异常，则执行fallback里的回调
 */
@FeignClient(name="provider",url = "http://localhost:8082",fallback = FallBackFeign.class)
public interface FeignConsumerClient {

    @GetMapping("/hello")
    String hello();

}

